import request from '@/utils/request'

// 查询入库单列表
export function listOrder(query) {
  return request({
    url: '/wms/order/list',
    method: 'get',
    params: query
  })
}

// 入库
export function receiptOrder(data) {
  return request({
    url: '/wms/order/s/receipt',
    method: 'post',
    data: data                    
  })
}

// 看板数据统计查询
export function selectStatus(status) {
  return request({
    url: '/wms/order/s/' + status,
    method: 'get'
  })
}

// 看板趋势统计查询
export function selectDate(date1,date2) {
  return request({
    url: '/wms/order/d/' + date1+'/'+date2,
    method: 'get'
  })
}

// 查询入库单详细
export function getOrder(id) {
  return request({
    url: '/wms/order/' + id,
    method: 'get'
  })
}

// 新增入库单
export function addOrder(data) {
  return request({
    url: '/wms/order',
    method: 'post',
    data: data
  })
}

// 修改入库单
export function updateOrder(data) {
  return request({
    url: '/wms/order',
    method: 'put',
    data: data
  })
}

// 删除入库单
export function delOrder(id) {
  return request({
    url: '/wms/order/' + id,
    method: 'delete'
  })
}
